package com.link.base.base.weibo.service;

import javax.annotation.Resource;

import com.link.base.base.weibo.dao.mybatis.mapper.WeiboCommentMapper;
import org.springframework.stereotype.Service;
import com.link.base.base.weibo.model.WeiboComment;
import com.link.core.basic.dao.mapper.BasicMapper;
import com.link.core.basic.service.BasicServiceImpl;

import java.util.List;

/**
 * @author: 郭闪
 * @date: 2019-02-19
 * @comments:
 */
@Service
public class WeiboCommentServiceImpl extends BasicServiceImpl<WeiboComment> implements WeiboCommentService {

    @Resource
    private WeiboCommentMapper weiboCommentMapper;

    @Override
    public BasicMapper<WeiboComment> getBasicMapper() {
        return weiboCommentMapper;
    }

    @Override
    public void commentsInsert(List<WeiboComment> weiboComments) {
        for (int i = 0; weiboComments != null && i < weiboComments.size(); ++i) {
            weiboCommentMapper.insertCommet(weiboComments.get(i));
        }

    }
}

